import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-04-21
 * Time: 17:52
 */
public class test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
     while (sc.hasNext()){
   int a = sc.nextInt();
         if(a==0){
             break;
         }

         int sum= 0;
         while (a>2){
             a=(int)Math.ceil(a/3);
             sum++;
         }
         System.out.println(sum);
     }
    }
}
